home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / SpaceballViewer / MyUIRegion.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.8 KB  |  88 lines

  1. /*
  2.  * Copyright (c) 1990-1991, 1994 Silicon Graphics, Inc.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that the name of Silicon Graphics may not be used in any advertising or
  7.  * publicity relating to the software without the specific, prior written
  8.  * permission of Silicon Graphics.
  9.  *
  10.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  11.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
  12.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  13.  *
  14.  * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  15.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
  16.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE
  17.  * POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
  18.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  19.  */
  20. //  -*- C++ -*-
  21.  
  22. /*
  23.  * Copyright (C) 1990,91   Silicon Graphics, Inc.
  24.  *
  25.  _______________________________________________________________________
  26.  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
  27.  |
  28.  |   $Revision: 1.1003 $
  29.  |
  30.  |   Description:
  31.  |    This file contains convenience routines which draws borders, and 
  32.  |    elevated 3D looking regions. Those 3D looking UI regions are primarly
  33.  |    used in SoSliders, SoColorPatch, SoColorWheel, ...
  34.  |
  35.  |   Author(s)    : Alain Dumesny
  36.  |
  37.  |
  38.  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
  39.  _______________________________________________________________________
  40.  */
  41.  
  42. #ifndef  _SO_UI_REGION_
  43. #define  _SO_UI_REGION_
  44.  
  45. #include <Inventor/SbBasic.h>
  46.  
  47. /*
  48.  * Defines
  49.  */
  50.  
  51. //
  52. // list of grey colors used when drawing regions
  53. //
  54. #define WHITE_UI_COLOR        glColor3ub(255,255,255)
  55. #define BLACK_UI_COLOR        glColor3ub(0,0,0)
  56. #define MAIN_UI_COLOR        glColor3ub(170,170,170)
  57. #define DARK1_UI_COLOR        glColor3ub(128,128,128)
  58. #define DARK2_UI_COLOR        glColor3ub(85,85,85)
  59. #define DARK3_UI_COLOR        glColor3ub(50,50,50)
  60. #define LIGHT1_UI_COLOR        glColor3ub(215,215,215)
  61.  
  62. #define UI_THICK 3
  63.  
  64.  
  65. #define SO_UI_REGION_GREY1    glColor3ub(240, 240, 240)
  66. #define SO_UI_REGION_GREY2    glColor3ub(190, 190, 190)
  67. #define SO_UI_REGION_GREY3    glColor3ub(150, 150, 150)
  68. #define SO_UI_REGION_GREY4    glColor3ub(130, 130, 130)
  69. #define SO_UI_REGION_GREY5    glColor3ub(110, 110, 110)
  70. #define SO_UI_REGION_GREY6    glColor3ub(70, 70, 70)
  71. #define SO_UI_REGION_GREY7    glColor3ub(30, 30, 30)
  72.  
  73.  
  74. /*
  75.  * Function prototypes
  76.  */
  77.  
  78. extern void
  79. drawDownUIRegion(short x1, short y1, short x2, short y2);
  80.  
  81. extern void
  82. drawDownUIBorders(short x1, short y1, short x2, short y2, SbBool blackLast=FALSE);
  83.  
  84. extern void
  85. drawThumbUIRegion(short x1, short y1, short x2, short y2);
  86.  
  87. #endif  // _SO_UI_REGION_
  88.